<%@ page import="com.workmanager.bean.LeaveMessageBean" %>
<%@ page import="java.util.List" %><%--
  Created by IntelliJ IDEA.
  User: YIJIE
  Date: 2016/8/26
  Time: 19:02
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="../inc/top.jsp"%>
<link href="<%=ctxpath%>/static/student/css/feedback.css" rel="stylesheet" />
<script src="<%=ctxpath%>/static/student/js/studentWork.js"></script>
<%
    TeacherBean teacher= (TeacherBean) request.getAttribute("ateacher");
    List<LeaveMessageBean> messages= (List<LeaveMessageBean>) request.getAttribute("leaveMessages");
%>
<form name="CommentsForm" method="post" id="CommentsForm" action="<%=ctxpath%>/StudentWorkController/submitComments.wm">
    <input name="teacher_id" id="teacher_id" type="hidden" value="${ateacher.teacher_id}" />
    <input name="student_id" id="student_id" type="hidden" value="${student_id}" />
<div >
    <div class="contentInfo">
        <span>指导教师：</span>
        <input type="text" value="${ateacher.teacher_name}" readonly />
    </div>
    <hr />我要留言
    <%if(messages!=null){%>
    <ul class="king-timeline-simple">
        <%for(int i=0;i<messages.size();i++) {
            if(messages.get(i).getLeaveMessage_from().equals("student")){%>
        <li class="primary">
            <div class="timeline-simple-wrap">
                <%=messages.get(i).getLeaveMessage_content()%>
                <span class="timeline-simple-date">学生（<%=messages.get(i).getLeaveMessage_date()%>）</span>
            </div>
        </li>
        <%}else{%>
        <li class="warning">
            <div class="timeline-simple-wrap">
                <%=messages.get(i).getLeaveMessage_content()%>
                <span class="timeline-simple-date">老师（<%=messages.get(i).getLeaveMessage_date()%>）</span>
            </div>
        </li>
        <%}}%>
    </ul>
    <%}%>
    <div class="feedInfo">
        <textarea rows="5" type="text" name="feedInfo" id="feedInfo"></textarea>
    </div>
    <div class="clickInfo">
        <button class="btn btn-primary" type="button" id="comments" name="comments">留言</button>
        <a href="<%=ctxpath%>/student/homePage.jsp" class="btn btn-info">返回</a>
    </div>
</div>
<%@include file="../inc/bottom.jsp"%>

